package com.qf.first.service.impl;

import com.qf.first.dao.ShopMapper;
import com.qf.first.entity.Shop;
import com.qf.first.pojo.vo.ShopUser;
import com.qf.first.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShopServiceImpl implements ShopService {
    @Autowired
    private ShopMapper shopMapper;
    @Override
    public int addShop(Shop shop) {
        int i = shopMapper.insertShop(shop);
        return i;
    }

    @Override
    public Shop checkShop(Shop shop) {
        Shop shop1 = shopMapper.selectShop(shop);
        return shop1;
    }

    @Override
    public ShopUser selectShop(Shop shop) {
        ShopUser shopUser = shopMapper.selectShopByShopId(shop);
        return shopUser;
    }

    @Override
    public int updateShop(Shop shop) {
        int i = shopMapper.updateShop(shop);
        return i;
    }
}
